package helloworld.admin.assembler.course;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

import helloworld.admin.bean.CourseAdminBean;
import helloworld.admin.form.course.CourseForm;

public class CourseFormAssembler
{
	
	private CourseFormAssembler() { }

	public static final CourseForm createCourseForm(CourseAdminBean courseDetail)
	{
		CourseForm form = new CourseForm();
		try
		{
			BeanUtils.copyProperties(form, courseDetail);			
		}
		catch (InvocationTargetException ite)
		{
			ite.printStackTrace();	//do nothing for now
		}
		catch (IllegalAccessException iae)
		{
			iae.printStackTrace();	//do nothing for now
		}
		return form;		
	}
}